package com.example.progressrecord.leancloud

import cn.leancloud.AVObject

object ProgressInfoParser {

    fun AVObject.toProgressInfo():ProgressInfo= ProgressInfo(
        this.getDate(ProgressInfo.TIME_KEY),
        this.getNumber(ProgressInfo.CREATININE_KEY).toFloat(),
        this.getNumber(ProgressInfo.URINE24H_VOLUME_KEY).toFloat(),
        this.getNumber(ProgressInfo.URINE_PROTEIN24H_CONCENTRATION_KEY).toFloat(),
        this.getString(ProgressInfo.REMARK_KEY)
    )
}